%
% This example shows how to manually advance a vertical slice of temperature
% data thru a series of timesteps, saving the vertical slice along the way.

url = 'http://ahab.marine.rutgers.edu:8080/dodsC/roms_sed/sed025/history';

lon = [14 15 16 17 18]';
lat = [44 43.5 43 42.5 42.5]';
rh = rslice ( 'url', url, 'variable', 'temp', 'vslice', [lon lat] );
rdata = guidata ( rh );

%
% turn off vslice velocity
set ( rdata.vslice_vel_figure, 'Visible', 'off' );
guidata ( rh, rdata );

%
% Loop thru twenty timesteps
for new_timestep = 0:19
	rdata.timestep = timestep;
	rslice_handle_new_timestep ( rh, [], guihandles(rh), new_timestep );
	drawnow;
	pause(1);

	rdata = guidata(rh);

	%
	% grab the slice data
	slice(new_timestep+1,:,:) = rdata.vslice_data.vdata;

end

x = rdata.vslice_data.vx;
z = rdata.vslice_data.vz;
